package com.rd.teacher.jichao.buke;

public class Rose extends Flower {
    //  String color;
    //  Double price;

    private String area;

    public Rose() {
    }

    public Rose(String color, Double price, String area) {
        this.color = color;
        this.price = price;
        this.area = area;
    }

    //     public void showInfo(){
    //        System.out.println("花的颜色是"+color + ",价格是" + price);
    //    }

    @Override
    public void showInfo() {
        super.showInfo();
        // System.out.println(color + "," + price);
        System.out.println("产地是" + area);
    }

    public void warn() {
        System.out.println("不要摘玫瑰花，小心扎手！");
    }

    public static void main(String[] args) {
        Flower flower = new Flower("白色",10.0);
        flower.showInfo();

        Rose rose = new Rose("紫色",30.0,"大理");
        rose.showInfo();
        rose.warn();
    }

}
